import { Component, Vue, Prop } from 'vue-property-decorator'
import { state } from '../store/spareData'

@Component({
  name: 'filterTypeName',
  filters: {
    filterTypeName (id: string): string {
      if (!id) {
        return ''
      }
      const ids = id.split(',')
      let result = ''
      ids.forEach(item => {
        result += state.allSpareTypeObj[item]?.typeName + '/'
      })
      return result.slice(0, result.length - 1)
    }
  }
})
export default class extends Vue {

}
